package model

import "time"

type SysMenu struct {
	Id          int        `json:"id,string" gorm:"primarykey"`
	Pid         *int       `json:"pid,string" gorm:"comment:父id"`
	Pids        string     `json:"pids" gorm:"comment:父ids"`
	Name        *string    `json:"name" gorm:"comment:名称"`
	Code        string     `json:"code" gorm:"comment:编码"`
	Type        *int8      `json:"type" gorm:"comment:菜单类型（字典 0目录 1菜单 2按钮）"`
	Icon        *string    `json:"icon" gorm:"comment:图标"`
	Router      *string    `json:"router" gorm:"comment:路由地址"`
	Component   string     `json:"component" gorm:"comment:组件地址"`
	Permission  string     `json:"permission" gorm:"comment:权限标识"`
	Application string     `json:"application" gorm:"comment:应用分类（应用编码）"`
	OpenType    *int8      `json:"openType" gorm:"comment:打开方式（字典 0无 1组件 2内链 3外链）"`
	Visible     string     `json:"visible" gorm:"comment:是否可见（Y-是，N-否）"`
	Link        *string    `json:"link" gorm:"comment:内链地址"`
	Redirect    *string    `json:"redirect" gorm:"comment:重定向地址"`
	Weight      int8       `json:"weight" gorm:"comment:权重（字典 1系统权重 2业务权重）"`
	Sort        int32      `json:"sort" gorm:"comment:排序"`
	Remark      string     `json:"remark" gorm:"comment:备注"`
	Method      string     `json:"method" gorm:"comment:请求方式"`
	Status      *int8      `json:"status" gorm:"comment:状态（字典 0正常 1停用 2删除）"`
	Children    []*SysMenu `json:"children" gorm:"-"`
	CreateTime  time.Time  `json:"createTime" gorm:"comment:创建时间"`
	CreateUser  int        `json:"createUser,string" gorm:"comment:创建人"`
	UpdateTime  time.Time  `json:"updateTime" gorm:"comment:更新时间"`
	UpdateUser  int        `json:"updateUser,string" gorm:"comment:更新人"`
}
